package com.hxx.config;

import com.hxx.ai.ChatAsissist;
import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.service.AiServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class MyConfig {

    @Autowired
   private ChatLanguageModel chatLanguageModel;

    @Bean
    public ChatAsissist chatAsissist(ChatLanguageModel chatLanguageModel){
        return AiServices.create(ChatAsissist.class, chatLanguageModel);
    }
}
